<?php
namespace app\home\controller;
use app\common\controller\Home;
use think\Cache;	
class home extends Home{ 
    public function index_create(){
		echo $this->fetch('ajax_show');	
        $link = 'index.html';
        $this->buildHtml($link,'./', '/index');
        exit;
    }
    protected function buildHtml($htmlfile = '', $htmlpath = '', $templateFile = ''){
        $path = config('template.view_path', ROOT_PATH . 'tpl' . DS . 'home' . DS) . config('site.default_theme') . DS;
        $this->view->config('view_path', $path);
        $content = $this->fetch($templateFile);
        $htmlpath = !empty($htmlpath) ? $htmlpath : './';
        $htmlfile = $htmlpath . $htmlfile . '.' . $GLOBALS['config']['html']['url_html_suffix'];
        $File = new \think\template\driver\File();
        $File->write($htmlfile, $content);
		$this->view->config('view_path','./lib/admin/view/');
        return $content;
    }	

}
// +----------------------------------------------------------------------
// | ZanPianCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.zanpian.com All rights reserved.
// +----------------------------------------------------------------------
// | BBS:  <http://www.feifeicms.cc>
// +----------------------------------------------------------------------
